﻿{% extends "layout/base.html" %}
{% block content %}
	<link rel="stylesheet" href="../media/css/calendar.css?random=20051112" type="text/css" media="screen" /> 
    <script type="text/javascript" src="../media/js/calendar.js?random=20060118"></script>
    <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
    <script type="text/javascript" src="../media/js/aucompleteCityAjout.js"></script>

<h1>Ajouter un trajet</h1>
<img alt="Fac by car - Co-voiturage Université de Marne-la-vallée" src="{{ MEDIA_URL }}/images/ajout-trajet-co-voiturage-2.jpg"/>

<h2>Fréquence</h2>

<form action={{ form_action }} method="post" id="form_route2">
	{% if daily == '1' %}
		<h3>Trajet quotidien</h3>
		<div id="form_route_time_daily">
			{{ form_daily.as_p }}
		</div>
		<div id="form_route_time_validity">
			<p><label for="start_time">Date de début de validité :</label>
			<input type="text" value=""  name="start_time" size="18"  style="width:130px" id="start_time" class="date" onclick="displayCalendar(this,'yyyy-mm-dd',this,true)"/>
			</p>
			<p><label for="end_time">Date de fin de validité :</label> <input type="text" value=""  name="end_time" size="18"  style="width:130px" id="end_time" class="date" onclick="displayCalendar(this,'yyyy-mm-dd',this,true)"/></p>
		</div>
		<div class="clear"></div>
	{% else %}
		<h3>Trajet ponctuel</h3>
		<p><label for="date">Départ le:</label> <input type="text" value=""  name="date" id="date" class="date" onclick="displayCalendar(this,'yyyy-mm-dd',this,true)"/></p>
		<div class="fieldWrapper"> 
			<p><label>{{ form.hour.label }}  : </label> {{ form.hour }} 
			{% for error in form.hour.errors %}<span class="error">{{ error }}</span>{% endfor %}</p>
		</div>   
    {% endif %}
	<p class="submit"><input type="submit" class="submit_search" value="Suivant >" /><p>
</form>


{% endblock content %}
